<!DOCTYPE html>
<html>
<head>
<base href="{$site_url}/" />
<!-- Use IE7 mode -->
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>调箱平台-计划要箱</title>
<meta name="description" content="普捷通" />
<meta name="keywords" content="普捷通|要箱|集港|疏港" />
<script type="text/javascript">
	//<!CDATA[
	var SITE_URL = "{$site_url}";
	var REAL_SITE_URL = "{$real_site_url}";
	var PRICE_FORMAT = '{$price_format}';
	//
</script>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link href="{res file=css/base.css}" rel="stylesheet" type="text/css" />
<link href="{res file=css/index.css}" rel="stylesheet" type="text/css" />
<link href="{res file=css/jquery.datetimepicker.css}" rel="stylesheet"
	type="text/css" />
	<link href="{res file=css/jquery-ui.min.css}" rel="stylesheet"
	type="text/css" />
<script type="text/javascript" src="index.php?act=jslang"></script>
<script type="text/javascript" src="{lib file=jquery-1.8.3.min.js}"
	charset="utf-8"></script>
<script type="text/javascript" src="{lib file=base.js}" charset="utf-8"></script>
<script type="text/javascript"
	src="{lib file=jquery.datetimepicker.full.js}" charset="utf-8"></script>
<script type="text/javascript"
	src="{lib file=jquery-ui.min.js}" charset="utf-8"></script>
<!--[if lt IE 10]>
<script type="text/javascript" src="{lib file=PIE.js}"></script>
<script src="{lib file=html5.js}"></script>
<script src="{lib file=css3-mediaqueries.js}"></script>
<style>
.labalfor txt{left: 0px;top:-2px}
</style>
<![endif]-->
<script type="text/javascript">
	$(function() {
		if (window.PIE) {
			$('.rounded').each(function() {
				PIE.attach(this);
			});
		}

		var busy=false;
		$("[id^='cancel_']").click(function() {
			var t=$(this);
			var n = $(this).attr("no");
			if (n != undefined&&n !="") {
				$("#mask").show();

				$("#mask").off("click");
				$("#mask").on("click", function() {
					$(this).hide();
				});

				$btnq = $("#q");
				$("#q").off("click");
				$("#q").on("click", function(e) {
					e.stopPropagation();
					if(busy){
						return false;
					}
					busy=true;
					var ajaxurl = '/index.php?';
					$.ajax({
						type: 'post',
						url: ajaxurl + location.search.substring(1),
						contentType: "application/x-www-form-urlencoded; charset=utf-8",
						data: {n:n,act:"cancel"},
						cache:false,
						beforeSend: function () {
							$btnq.text('正在取消..');
						},
						error: function () {
							busy=false;
							$("#mask").hide();
							showerror('网络繁忙，请稍后再试');
						},
						success: function (response) {
							busy=false;
							if (response) {
								try{
									var obj = eval(response);

									if (obj.success) {
										//window.location.href=window.location.href;
									}

									if (obj.info) {
										showerror(obj.info);
										$btnq.text('确定');
										$("#mask").hide();
									}
								}catch(e){
									showerror('发生错误，请重试');
									$btnq.text('确定');
									$("#mask").hide();
								}

							}
							$btnq.text('确定');
						}
					});
				});
			}
		});
		
		$("#btn-go").click(function() {
			window.location.href = "/index.php?app=plan";
		});

		/*$('#USE_DD').datetimepicker({
			value : "{$d|date:Y/m/d H:00}",
			step : 10,
			lang : 'ch'
		});
		$('#EUSE_DD').datetimepicker({
			value : "{$d7|date:Y/m/d H:00}",
			step : 10,
			lang : 'ch'
		});*/

		$( "#sname" ).autocomplete({
			source: function(request, response) {
                $.ajax({
                    url: "/index.php?app=sl&act=getsl&ty=0",
                    contentType : "application/x-www-form-urlencoded; charset=utf-8",
					data : {
						t : request.term
					},
                    success: function(data) {
                        response($.map($.parseJSON(data), function(item) {
                            return { label: item.sname, value: item.code }
                        }));
                    }
                });
            },
　　　　　	 select: function(event, ui) {
　　　　　		 $("#sname").val(ui.item.label);
             	 $("#CUS_NO").val(ui.item.value);
             	$("#sname").removeClass("form-item-error");
             	 return false;
            },
            change: function( event, ui ) {
            	if(ui.item!=null){
            	 $("#sname").val(ui.item.label);
             	 $("#CUS_NO").val(ui.item.value);
             	$("#sname").removeClass("form-item-error");
            	}else{
            		 $("#sname").val("");
                 	 $("#CUS_NO").val("");
            	}
             	 return false;
            },
            minLength: 0, 
            autoFocus: false, 
		});
		
		/*$("#sname").keydown(function(e) {
			if (e.which == 13) {
				$("#sname").blur();
			}
		});

		$("#sname")
				.focus(function() {
					$(this).val("");
				})
				.blur(
						function() {
							var o = $(this).attr("o");
							var t = $(this).val();
							if (t != "") {
								$
										.ajax({
											type : 'post',
											url : "/index.php?app=sl&act=getsl",
											contentType : "application/x-www-form-urlencoded; charset=utf-8",
											data : {
												t : t
											},
											cache : false,
											error : function() {
												$("#sname").val(o);
											},
											success : function(response) {
												if (response > 0) {
													window.location.href = "/index.php?app=sl&act=ofast&id="
															+ response;

												} else {
													$("#sname").val(o);
												}
											}
										});
							} else {
								$(this).val(o);
							}

						});*/
	});
</script>
{$_head_tags}

<style>
.barleft {
	height: 700px;
}

.ysleft {
	width: 377px;
	height: 377px;
	border: 1px solid #cccccc;
	margin: 30px 50px 50px 20px;
	text-align: center;
	line-height: 347px;
	overflow: hidden;
}

.ysleft img {
	height: 114px;
	width: 114px
}

.ysright {
	width: 580px;
	font-size: 14px;
	color: #999
}

.ysright h1 {
	font-weight: bold;
	color: #333;
	font-size: 22px;
	margin-bottom: 20px
}

.labal {
	width: 100px;
}

.labalrow {
	height: 51px;
	line-height: 51px
}

.labalfor {
	margin-top: 10px
}

.labalfor li {
	float: left;
	width: 80px;
	height: 30px;
	line-height: 30px;
	text-align: center;
	border: 1px solid #ccc;
	margin-right: 10px;
	cursor: pointer;
	margin-bottom: 10px;
}

.btn-register {
	width: 200px;
	height: 54px;
	color: #fff;
	background: #3e7fc2;
	border: 0;
	font-size: 16px;
	font-family: "Microsoft YaHei", "Hiragino Sans GB";
	cursor: pointer;
}

.form-item-error {
	border: solid 1px #e22 !important;
}

.tlist {
	width: 100%;
	font-size: 14px;
	background-color: #fff;
	text-align: center;
	border-spacing: 0;
	width: 340px
}

.tlist th {
	background: #f4f5f9;
	height: 40px;
	line-height: 40px;
	text-align: center;
	font-weight: normal;
	color: #222;
	white-space: nowrap;
}

.tlist td {
	height: 50px;
	line-height: 50px;
	text-align: center;
	white-space: nowrap;
	color: #8d8d8d;
}

.tlist input[type='checkbox'],#checkall {
	border: 0px;
	width: 18px;
	height: 18px;
	border: solid 1px #cfd1d3;
	vertical-align: middle;
}

.mcontent {
	width: 400px;
	height: 150px;
	background: #fff;
	margin: 0 auto;
	position: absolute;
	top: 50%;
	left: 50%;
	margin-top: -75px;
	margin-left: -200px;
	border-radius: 3px;
	-moz-border-radius: 3px;
	-webkit-border-radius: 3px;
}

.mfoot a {
	position: absolute;
	width: 50%;
	bottom: 0;
	text-align: center;
	height: 50px;
	line-height: 50px;
	font-size: 14px;
	color: #fff
}

.q {
	right: 0;
	background: #3e7fc2;
}

.mfoot a:hover {
	font-size: 18px;
	text-decoration: none
}

.c {
	background: #ccc
}

.mhead {
	font-size: 16px;
	text-align: center;
	line-height: 100px
}

.labal {
	width: 100px;
}

.labalrow {
	height: 42px;
	line-height: 42px;
	font-size: 14px;
	color: #999
}

.labalfor {
	margin-top: 10px
}

.labalfor li {
	float: left;
	width: 80px;
	height: 30px;
	line-height: 30px;
	text-align: center;
	border: 1px solid #ccc;
	margin-right: 10px;
	cursor: pointer;
	margin-bottom: 10px;
}
.ui-menu .ui-menu-item {
    font-size: 14px;
   
    padding: 2px;
}
</style>
</head>
<body>
	<div id="syss" class="syss rounded">操作成功</div>
	<div id="syse" class="syse rounded">操作失败</div>
	<div class="mask" id="mask">
		<div class="mcontent">
			<div class="mhead">确认要取消此要箱？</div>
			<div class="mfoot">
				<a href="javascript:;" class="c" id="c">取消</a> <a
					href="javascript:;" class="q" id="q">确定</a>
			</div>
		</div>
	</div>
	<div class="topbar">
		<div class="w">
			<div class="fr">
				<!--{if !$visitor.user_id}-->
				<a href="{url app=member&act=login&ret_url=$ret_url}"
					style="color: #C81623">请登录</a>
				<div class="spacer"></div>
				<a href="{url app=member&act=register&ret_url=$ret_url}">免费注册</a>
				<!--{else}-->

				欢迎您登陆!&nbsp;&nbsp;{$visitor.real_name|escape}

				<div class="spacer"></div>
				<a href="{url app=member&act=setpwd}">修改密码</a>
				<div class="spacer"></div>
				<a href="{url app=member&act=logout}">{$lang.logout}</a>
				<!--{/if}-->
			</div>

			<div class="cl"></div>
		</div>
	</div>
	<div style="position: relative;" class="submain">
		<div class="w">
			<div id="logoindex" class="fl">
				<a href="index.php"><img
					src="themes/mall/default/styles/default/images/logo1.png"> </a>
			</div>
			<ul class="navbar fr" style="position: relative;">
				<li><a href="index.php"><p>首页</p> </a></li>
				<li><a class="on" href="index.php?app=sl&act=ofast"><p>集运</p>
				</a></li>
				<li><a href="javascript:;"><p>堆场</p> </a></li>
				<li><a href="javascript:;"><p>报关</p> </a></li>
				<li><a href="javascript:;"><p>促销专区</p> </a></li>
			</ul>
			<div class="cl"></div>
		</div>
		<div class="cl"></div>
	</div>
	<style>
	
	</style>
	<div class="w">
		<div class="fl w150 barleft">
			<ul class="navbarleft">
				<li><a href="index.php?app=sl&act=pfast" class="on">计划要箱</a></li>
				<li><a href="index.php?app=sl&act=ofast">一键要箱</a></li>
				<li><a href="index.php?app=plan&act=fast">快速要箱</a>
				</li>
				<li class="de"><a href="index.php?app=plan">订单确认</a></li>
				<li class="kx"><a href="index.php?app=plan">空箱</a>
				</li>
				<li class="zx"><a href="index.php?app=containerplan">重箱</a>
				</li>
				<li><a href="index.php?app=plan&act=wl">查看物流</a></li>
				<li><a href="index.php?app=plan&act=fee">账单明细</a>
				</li>
				<li style="display: none"><a href="index.php?app=plan&act=fast">快速要箱</a>
				</li>
				<li style="display: none"><a href="index.php?app=usebox">状态查询</a>
				</li>
				<li style="display: none"><a href="index.php?app=plan&act=fang">放单查询</a>
				</li>
				<li style="display: none"><a
					href="index.php?app=plan&act=wsearch">提单查询</a>
				</li>
			</ul>
			<div class="cl"></div>
		</div>
		<style>
.nc {
	height: 20px;
	width: 20px;
	background: #ff6600;
	-webkit-border-radius: 3px;
	-moz-border-radius: 3px;
	border-radius: 3px;
}

.cc {
	background: url('/themes/mall/default/styles/ok.png') no-repeat center
		center;
	background-color: #ff6600;
}
#sname{    font-weight: bold;
    color: #333;
    font-size: 22px;
    margin-bottom: 20px;
    font-family: 微软雅黑;
    border: 1px solid #ccc;
    width: 393px;
    padding: 0 10px;
    height: 40px;
    line-height: 40px;
    background: url(/images/d.png) no-repeat 412px center;padding-right: 45px}
    .ui-menu {
    background: #ededed;
    max-height: 400px;
    overflow: auto;
}
</style>
		<script>
		$(function(){
			$("#ncdiv").click(function(){
				var j=$("#jj_flag").val();
				if(j==""){
					$("#jj_flag").val("Y");
					$("#nc").addClass("cc");
				}else{
					$("#jj_flag").val("");
					$("#nc").removeClass("cc");
				}
			});
		});
		</script>
		<div class="fl w800 barright">
			<form action="" id="ys-form" method="get">
				<input type="hidden" name="app" value="sl" /> <input type="hidden"
					name="act" value="pyd" /> <input type="hidden" name="id" id="sid"
					value="{$s.sid}" /> <input type="hidden" name="CUS_NO" id="CUS_NO"
					value="{$s.code}" /> <input type="hidden" name="XX" id="XX"
					value="{$tt}" /> 

				<div class="fl ysright">
					<h1>
						<input type="text" value="{$s.sname}" id="sname" o="{$s.sname}" placeholder="请输入船公司编码或名称">						
					</h1>
					{if $type}
					<div class="">
						<div class="fl labal">箱型：</div>
						<div class="fl labalfor" style="width: 490px; margin-top: 0px">
							<ul>
								{foreach from=$type item=t name=i}
								<li id="t_{$t.d_tid}" v="{$t.d_value}"
									class="{if $smarty.foreach.i.first}on{/if}">{$t.d_value}</li>
								{/foreach}
							</ul>
						</div>
					</div>
					<div class="cl"></div>
					{/if}
					<div class="labalrow">
						<div class="fl labal">箱量：</div>
						<div class="fl labalfor">
							<div class="minus fl" id="minus"></div>
							<input type="text" name="QTY" id="QTY" class="fl QTY" value="1" />
							<div class="plus fl" id="plus"></div>
						</div>

					</div>
					{if $week}
					<div class="" style="margin-top: 20px">
						<div class="fl labal">计划用箱周：</div>
						<div class="fl labalfor" style="width: 490px; margin-top: 0px">
							<ul>
								{foreach from=$week item=t name=i}
								<li id="w_{$t.w}" s="{$t.s}" e="{$t.e}" class="{if $smarty.foreach.i.first}on{/if}" style="margin-bottom: 0">{$t.n}</li>
								{/foreach}
							</ul>
						</div>
					</div>
					<div class="cl"></div>
					{/if}
					
					<div class="labalrow">
						<div class="fl labal">计划开始时间：</div>
						<div class="fl labalfor">
							<input type="text" name="B_DD" value="{$B_DD}" id="B_DD" class="fl SHIP_OVOY" readonly="readonly" style="background: #ededed"/>
						</div>
						<div class="fl labal" style="margin-left: 30px">计划截止时间：</div>
						<div class="fl labalfor" style="position: relative;">
							<input type="text" name="E_DD" id="E_DD"
								class="fl SHIP_OVOY"  value="{$E_DD}" readonly="readonly" style="background: #ededed"/>
						</div>
					</div>
				
					<div class="labalrow">
						<div class="fl labal">备注：</div>
						<div class="fl labalfor">
							<input type="text" name="REM" id="REM" class="fl REM"
								placeholder="请输入备注" />
						</div>
					</div>

					<div class="labalrow">
						<div class="fl labal"></div>
						<div class="fl labalfor">
							<button type="button" class="btn-register" id="btn-submit">加入计划</button>

							<a href="/index.php?app=plan&act=p"
								style="color: #ff6600; font-size: 16px; margin-left: 20px">查询当前盘存</a>
						</div>
					</div>
				</div>

			</form>
			<style>
.f {
	width: 50%;
	border-bottom: 5px solid #3e7fc2;
	float: left;
}

.nf {
	width: 50%;
	border-bottom: 5px solid #cccccc;
	float: left;
}

.b {
	color: #3e7fc2 !important
}

.bdiv {
	width: 80%;
	margin: 0 auto
}

.h1 {
	border-bottom: 3px solid #ccc;
	height: 40px;
	line-height: 40px;
	font-size: 16px;
	color: #3e7fc2;
}

.h2 {
	border-bottom: 3px solid #3e7fc2;
	float: left;
}

.ship_area {
	height: 200px;
	padding-right: 15px;
	margin-top: 0;
	width: 355px;
}

.ship_area a {
	margin: 0;
}

.datanone {
	width: 355px;
}
</style>
			<div class="fr">
				
				
				<div class="h1">
					<div class="h2">{$n}</div>
					<a href="index.php?app=plan&act=wl" style="    float: right;
    color: #3e7fc2;">more</a>
					<div class="cl"></div>
				</div>
				<div class="cl"></div>
				{if $cl}
				<table class="tlist" style="width: 100%;padding-right: 0;display: none">
						<tr>
							<th style="width: 100px;">船公司</th>
							<th style="width: 30px">箱型</th>
							<th style="width: 60px">计划箱量</th>
							<th style="width: 60px">空箱进场</th>
							<th style="width: 60px">重箱进场</th>
						</tr>
						</table>
				<div class="ship_area">
					<table class="tlist" style="width: 600px">
					<tr>
							<th style="width: 100px;">船公司</th>
							<th style="width: 30px">箱型</th>
							<th style="width: 60px">计划箱量</th>
							<th style="width: 120px">计划时间</th>
							<th style="width: 60px">预配箱量</th>
							<th style="width: 120px">提报时间</th>
							<th style="width: 60px">实际用箱量</th>
						</tr>
						{foreach from=$cl item=c name=i}
						<tr>
							<td style="text-align: left"><div
									style="width: 100px;overflow: hidden;" title="{$c.CUS_NO}">{$c.CUS_NO|truncate:10}</div>
							</td>
							<td style="width: 30px;">{$c.XX}</td>
							<td style="width: 60px;">{$c.QTY}</td>
							<td style="width: 120px;">{$c.JH_DD}</td>
							<td style="width: 60px;">{$c.FI_QTY}</td>
							<td style="width: 120px;">{$c.MK_DD}</td>
							<td style="width: 60px;">{$c.UQTY}</td>
						</tr>
						{/foreach}
					</table>

					<div class="cl"></div>
				</div>
				{else}
				<div class="datanone">
					<img src="n.png" width="136">
				</div>
				{/if}
			</div>
		 
			<div class="fr" style="margin-top: 30px">
				<div class="h1">
					<div class="h2">个人中心</div>
					<a href="index.php?app=plan&act=wl" style="    float: right;
    color: #3e7fc2;">more</a>
					<div class="cl"></div>
				</div>
				<div class="cl"></div>
				<table class="tlist" style="width: 100%;padding-right: 0;display: none">
						<tr>
							<th>提单号</th>
							<th style="width: 150px;">用箱时间</th>
							<th style="width: 60px;"></th>
						</tr>
						</table>
						{if $pl}
				<div class="ship_area">
					<table class="tlist" style="width: 600px">
					<tr>
							<th style="width: 100px;">船公司</th>
							<th style="width: 30px">箱型</th>
							<th style="width: 60px">计划箱量</th>
							<th style="width: 120px">计划时间</th>
							<th style="width: 60px">预配箱量</th>
							<th style="width: 120px">提报时间</th>
							<th style="width: 60px">实际用箱量</th>
						</tr>
						{foreach from=$pl item=c name=i}
						<tr>
							<td style="text-align: left"><div
									style="width: 100px;overflow: hidden;" title="{$c.CUS_NO}">{$c.CUS_NO|truncate:10}</div>
							</td>
							<td style="width: 30px;">{$c.XX}</td>
							<td style="width: 60px;">{$c.QTY}</td>
							<td style="width: 120px;">{$c.JH_DD}</td>
							<td style="width: 60px;">{$c.FI_QTY}</td>
							<td style="width: 120px;">{$c.MK_DD}</td>
							<td style="width: 60px;">{$c.UQTY}</td>
						</tr>
						{/foreach}
					</table>

					<div class="cl"></div>
				</div>
			</div>
			{else}
			<div class="datanone">
				<img src="n.png" width="136">
			</div>
			{/if}
			<div class="cl"></div>
			
		</div>
	</div>
<div class="cl"></div>
	<div class="w">
		<div id="footer-2013" style="margin-top: 50px">

			<div class="copyright">
				Copyright&copy;2004-2020&nbsp;&nbsp;普捷通&nbsp;版权所有</div>
				<div style="width:300px;margin:0 auto;">
		 		<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=31011502002931" style="display:inline-block;text-decoration:none;height:20px;line-height:20px;"><img src="/themes/mall/default/ba.png" style="float:left;"/><p style="float:left;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;">沪公网安备 31011502002931号</p></a>
		 	</div>
		</div>
	</div>
	<script type="text/javascript">
		seajs.use('/includes/libraries/javascript/pfast.js', function(ys) {
			ys.init();
		});
	</script>
</body>
</html>